//Sat 13 Feb 2010 05:50:24 PM CST 
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <ctime>

using namespace std;

class TrappingRabbit
{
public:
	int findMinimumTime(vector <int> trapX, vector <int> trapY)
	{
		int N = trapX.size();
		int mmin = -1;
		for(int i=0; i<N; i++)
		{
			int sum = trapX[i] + trapY[i] - 2;
			if(mmin == -1 || mmin > sum)
				mmin = sum;
		}
		return mmin;
	}
};
